package com.sikaryofficial.system.api;

import com.sikaryofficial.common.core.constant.SecurityConstants;
import com.sikaryofficial.common.core.constant.ServiceNameConstants;
import com.sikaryofficial.common.core.domain.R;
import com.sikaryofficial.system.api.factory.RemoteUserDailyFallbackFactory;
import com.sikaryofficial.system.api.model.ManualExportReq;
import com.sikaryofficial.system.api.model.user.UserDailyDTO;
import com.sikaryofficial.system.api.model.user.UserRegisterDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * 用户服务
 *
 * @author qinjinyuan
 */
@FeignClient(contextId = "remoteUserDailyService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserDailyFallbackFactory.class)
public interface RemoteUserDailyService {
    /**
     * 根据时间段查询时间范围内的注册用户
     *
     * @return 结果
     */
    @PostMapping("/statistics/queryRegisterDailyByTime")
    R<List<UserRegisterDTO>> queryRegisterDailyByTime(@RequestBody ManualExportReq req);

    /**
     * 根据时间段查询时间范围内的日活用户
     *
     * @return 结果
     */
    @PostMapping("/statistics/queryDailyByTime")
    R<List<UserDailyDTO>> queryDailyByTime(@RequestBody ManualExportReq req);

}
